﻿<h2>@ViewBag.Title</h2>

 @Styles.Render("~/Content/Views.css")
    @*@ViewBag.StockToBuy*@
<div class="CSSTableGenerator" >
<table>
    <tr>
	    <th>Stock Symbol</th>
        <th>High</th>
        <th>Change</th>
        <th>Open</th>
        <th>Previous Close</th>
        <th>Bid</th>
        <th>Ask</th>
        <th>Volume</th>
        <th>Eps</th>
        <th>Pe Ratio</th>
        <th>In My Portfolio</th>
    </tr>

 @try
    {
    foreach (var stock in ViewBag.StockToBuy) 
    {
            <tr>
                <td>
                    @stock.Symbol
                </td> 
        
                <td>
                    @stock.High
                </td>
                
                <td>
                    @stock.Change
                </td>
                
                <td>
                    @stock.Open
                </td>
                
                <td>
                    @stock.PreviousClose
                </td>
                
                <td>
                    @stock.Bid
                </td>
                
                <td>
                    @stock.Ask
                </td>
                
                <td>
                    @stock.Volume
                </td> 

                <td>
                    @stock.EPS
                </td>

                <td>
                    @stock.PERatio
                </td>
                
                <td>                  
                    @if(@stock.InUserPortfolio.Equals(true))
                    {
                        @: X
                    }                    
                </td> 
             </tr>                  
        
    }
       
    }
 catch (Exception)
 {
 }
     </table>
    </div>

<br />
<h2>Stocks To Sell</h2>

<div class="CSSTableGenerator" >
<table>
    <tr>
	    <th>Stock Symbol</th>
        <th>High</th>
        <th>Change</th>
        <th>Open</th>
        <th>Previous Close</th>
        <th>Bid</th>
        <th>Ask</th>
        <th>Volume</th>
        <th>Eps</th>
        <th>Pe Ratio</th>
        <th>In My Portfolio</th>
    </tr>

@try
    {
        foreach (var stock in ViewBag.StocksToSell) 
    {
            <tr>
                <td>
                    @stock.Symbol
                </td> 
        
                <td>
                    @stock.High
                </td>
                
                <td>
                    @stock.Change
                </td>
                
                <td>
                    @stock.Open
                </td>
                
                <td>
                    @stock.PreviousClose
                </td>
                
                <td>
                    @stock.Bid
                </td>
                
                <td>
                    @stock.Ask
                </td>
                
                <td>
                    @stock.Volume
                </td> 

                <td>
                    @stock.EPS
                </td>

                <td>
                    @stock.PERatio
                </td>
                
                <td>                  
                    @if(@stock.InUserPortfolio.Equals(true))
                    {
                        @: X
                    }                    
                </td>  
             </tr>                  
        
    }
       
    }
 catch (Exception)
 {
 }
     </table>
    </div>

